package org.meb.conquest.db.util;

import org.apache.commons.collections4.Transformer;
import org.meb.conquest.db.model.DeckMember;
import org.meb.conquest.db.model.loc.Domain;

public class Transformers {

	public static final Transformer<DeckMember, Long> DEME_ID = new Transformer<DeckMember, Long>() {

		@Override
		public Long transform(DeckMember input) {
			return input.getId();
		}
	};

	public static final Transformer<DeckMember, Long> DEME_CARD_ID = new Transformer<DeckMember, Long>() {

		@Override
		public Long transform(DeckMember input) {
			return input.getCard().getId();
		}
	};

	public static final Transformer<DeckMember, String> DEME_CARD_TECH_NAME = new Transformer<DeckMember, String>() {

		@Override
		public String transform(DeckMember input) {
			return input.getCard().getTechName();
		}
	};

	public static final Transformer<Domain, String> DOMA_NAME = new Transformer<Domain, String>() {

		@Override
		public String transform(Domain input) {
			return input.getDomain();
		}
	};
}
